var express = require('express');
const RateController = require('../../controllers/admin/RateController');
var RateRouter = express.Router();

//图片上传
const multer = require("multer")
const upload = multer({dest:"public/avataruploads/"})
// 朝这个路径发送请求  就会进UserController方法
RateRouter.post("/adminapi/rate/add",upload.single("file"),RateController.add)
RateRouter.post("/adminapi/rate/email",upload.single("file"),RateController.email)

RateRouter.get("/adminapi/rate/list",RateController.getList)
RateRouter.get("/adminapi/rate/list2",RateController.getList2)
RateRouter.get("/adminapi/rate/list3",RateController.getList3)
RateRouter.get("/adminapi/rate/list4/:data",RateController.getListdata)
RateRouter.get("/adminapi/rate/slist",RateController.searchGetList)

RateRouter.delete("/adminapi/rate/list/:id",RateController.delList)
RateRouter.get("/adminapi/rate/list/:id",RateController.getList)
RateRouter.put("/adminapi/rate/list/:id",RateController.putList)

 
module.exports = RateRouter;

